package com.neutech.vo;

import java.util.List;
import java.util.Map;

public class ViewObject {
	private List<Map<String,Object>> list;//响应给前端的数据List，如 genderList,feeCollectedList,feeSettledTypeList,noonTypeList,visitDoctorList,registLeList,deptList
	private String status;//前端消息框的状态
	private String msg;//消息框中的内容
	private int totalItems;//数据总条数即已用挂号的额度
	public ViewObject() {
		super();
	}
	public ViewObject(String status, String msg) {
		super();
		this.status = status;
		this.msg = msg;
	}
	public ViewObject(List<Map<String, Object>> list, String status, String msg, int totalItems) {
		super();
		this.list = list;
		this.status = status;
		this.msg = msg;
		this.totalItems = totalItems;
	}
	public List<Map<String, Object>> getList() {
		return list;
	}
	public void setList(List<Map<String, Object>> list) {
		this.list = list;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public int getTotalItems() {
		return totalItems;
	}
	public void setTotalItems(int totalItems) {
		this.totalItems = totalItems;
	}
	@Override
	public String toString() {
		return "ViewObject [list=" + list + ", status=" + status + ", msg=" + msg + ", totalItems=" + totalItems + "]";
	}
	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		final int prime = 31;
		int result = 1;
		result = prime * result + ((list == null) ? 0 : list.hashCode());
		result = prime * result + ((msg == null) ? 0 : msg.hashCode());
		result = prime * result + ((status == null) ? 0 : status.hashCode());
		result = prime * result + totalItems;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		// TODO Auto-generated method stub
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ViewObject other = (ViewObject) obj;
		if (list == null) {
			if (other.list != null)
				return false;
		} else if (!list.equals(other.list))
			return false;
		if (msg == null) {
			if (other.msg != null)
				return false;
		} else if (!msg.equals(other.msg))
			return false;
		if (status == null) {
			if (other.status != null)
				return false;
		} else if (!status.equals(other.status))
			return false;
		if (totalItems != other.totalItems)
			return false;
		return true;
	}
	
}
